package com.tema2.Lab4.Ex1;

public class Counter {
	final Integer MAX_COUNT = 50;
	private Integer step;
	private Integer count;

	public Counter() {
		this.step = 1;
		this.count = 1;
	}
	
	/**
	 * Metodo encargado de settear el step un valor elegido
	 * @param step
	 */
	public void setStep(Integer step) {
		this.step = step;
	}
	
	/**
	 * Metodo encargado de imprimir en consola el contador y le suma un paso.
	 */
	public void displayCount(){
		while(count<=MAX_COUNT){
			System.out.println(count.toString());
			count=count+step;
		}
	}

}
